Skip to content

feat(charts): add revisionHistoryLimit to deployment#4639

Open
zyzzmohit wants to merge 1 commit intokubernetes-sigs:mainfrom
zyzzmohit:feature/helm-revision-history-limit
Open

feat(charts): add revisionHistoryLimit to deployment#4639
zyzzmohit wants to merge 1 commit intokubernetes-sigs:mainfrom
zyzzmohit:feature/helm-revision-history-limit

Conversation

@zyzzmohit
Copy link
Contributor

Summary

This PR adds the revisionHistoryLimit configuration to the Helm chart. This allows users to control the number of old ReplicaSets retained by the Deployment, preventing accumulation of unused resources (defaulting to 10).

Related Issue

Fixes #4638

Changes

  • Added revisionHistoryLimit to values.yaml (default: 10)
  • Updated deployment.yaml to use the new value
  • Bumped Chart version to 0.40.1

Steps to Test

  1. Run helm template . | grep revisionHistoryLimit to verify default value (10).
  2. Run helm template . --set revisionHistoryLimit=5 | grep revisionHistoryLimit to verify override works.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 8, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: zyzzmohit / name: Mohit Ray (9f9a678)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zyzzmohit
Once this PR has been reviewed and has the lgtm label, please assign joaquimrocha for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from skoeva February 8, 2026 09:04
@k8s-ci-robot
Copy link
Contributor

Welcome @zyzzmohit!

It looks like this is your first PR to kubernetes-sigs/headlamp 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/headlamp has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 8, 2026
@illume illume requested a review from Copilot February 8, 2026 11:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds configurable revisionHistoryLimit to the Headlamp Helm chart Deployment so operators can control how many old ReplicaSets are retained (defaulting to 10), and bumps the chart version accordingly.

Changes:

  • Introduces revisionHistoryLimit in values.yaml (default: 10).
  • Renders spec.revisionHistoryLimit in the Deployment template from the new value.
  • Bumps chart version to 0.40.1.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
charts/headlamp/values.yaml Adds revisionHistoryLimit value and includes some YAML formatting cleanups.
charts/headlamp/templates/deployment.yaml Applies the new .Values.revisionHistoryLimit to Deployment spec.
charts/headlamp/Chart.yaml Bumps chart version to 0.40.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{{- end }}
spec:
replicas: {{ .Values.replicaCount }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding revisionHistoryLimit to the Deployment changes the rendered manifests, but the Helm chart snapshot tests under charts/headlamp/tests/expected_templates/ still reflect the old output. Update the expected templates (and ideally add a test case exercising a non-default override) so CI doesn’t fail and the new value is covered.

Copilot uses AI. Check for mistakes.
- name: kinvolk
url: https://kinvolk.io/
version: 0.40.0
version: 0.40.1
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chart version was bumped to 0.40.1, which will change the rendered helm.sh/chart label and will cause the Helm chart snapshot tests in charts/headlamp/tests/expected_templates/ to fail unless they are regenerated/updated. Please update the expected templates to match the new chart version.

Copilot uses AI. Check for mistakes.
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 9, 2026
@zyzzmohit zyzzmohit closed this Feb 9, 2026
@zyzzmohit zyzzmohit reopened this Feb 9, 2026
Copy link
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the commit messages match the commit guidelines in the contributing guide? See git log for examples.

Signed-off-by: zyzzmohit <mohitray949@gmail.com>
@zyzzmohit zyzzmohit force-pushed the feature/helm-revision-history-limit branch from a145ae6 to 9f9a678 Compare February 15, 2026 14:50
@zyzzmohit
Copy link
Contributor Author

Please check the commit messages match the commit guidelines in the contributing guide? See git log for examples.

Thanks for the review @illume! I've updated the PR:

Rebased on latest main and squashed into a single commit
Fixed commit message to follow the project convention: charts: deployment: Add revisionHistoryLimit configuration
Also improved the
values.yaml
comment wording as suggested by Copilot
Ready for re-review :)

@zyzzmohit zyzzmohit requested a review from illume February 15, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure revisionHistoryLimit in Helm chart

3 participants